export const namespace = "courseCategory";

export const calcColumns = (params) => {
  const { operate } = params;
  const columns = [
    {
      title: "分类ID",
      dataIndex: "id",
      hideInSearch: true,
    },
    {
      title: "分类名称",
      dataIndex: "categoryName",
    },
    {
      title: "课程数",
      dataIndex: "courseNum",
      hideInSearch: true,
    },
    {
      title: "状态",
      dataIndex: "courseStatus",
      valueType: "radio",
      valueEnum: {
        0: { text: "启用", status: "Success" },
        1: { text: "禁用", status: "Error" },
      },
    },
    // {
    //   title: "排序值",
    //   dataIndex: "categoryOrder",
    //   hideInSearch: true,
    // },
  ];

  columns.push(operate);
  return columns;
};
